3.25 \(\int \frac {1}{1-\cos ^2(x)} \, dx\)

Optimal. Leaf size=4 \[ -\cot (x) \]

[Out]

-cot(x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 4, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3175, 3767, 8} \[ -\cot (x) \]

Antiderivative was successfully verified.

[In]

Int[(1 - Cos[x]^2)^(-1),x]

[Out]

-Cot[x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {1}{1-\cos ^2(x)} \, dx &=\int \csc ^2(x) \, dx\\ &=-\operatorname {Subst}(\int 1 \, dx,x,\cot (x))\\ &=-\cot (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 4, normalized size = 1.00 \[ -\cot (x) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 - Cos[x]^2)^(-1),x]

[Out]

-Cot[x]

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 8, normalized size = 2.00 \[ -\frac {\cos \relax (x)}{\sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2),x, algorithm="fricas")

[Out]

-cos(x)/sin(x)

________________________________________________________________________________________

giac [A]  time = 0.27, size = 6, normalized size = 1.50 \[ -\frac {1}{\tan \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2),x, algorithm="giac")

[Out]

-1/tan(x)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 7, normalized size = 1.75 \[ -\frac {1}{\tan \relax (x )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1-cos(x)^2),x)

[Out]

-1/tan(x)

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 6, normalized size = 1.50 \[ -\frac {1}{\tan \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)^2),x, algorithm="maxima")

[Out]

-1/tan(x)

________________________________________________________________________________________

mupad [B]  time = 2.24, size = 4, normalized size = 1.00 \[ -\mathrm {cot}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-1/(cos(x)^2 - 1),x)

[Out]

-cot(x)

________________________________________________________________________________________

sympy [B]  time = 0.43, size = 14, normalized size = 3.50 \[ \frac {\tan {\left (\frac {x}{2} \right )}}{2} - \frac {1}{2 \tan {\left (\frac {x}{2} \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1-cos(x)**2),x)

[Out]

tan(x/2)/2 - 1/(2*tan(x/2))

________________________________________________________________________________________